package com.dimeng.entity;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.dimeng.R;

/**
 * @author write by ccn<br>
 *         <b>helloandroid100@gmail.com</b>
 * @version 0.1;2012-5-20 下午7:11:00<br>
 *          descrition:资讯列表的ListView的item视图缓存
 */
public class InfoViewCache {
	private View baseView;

	private TextView titleView;
	private TextView createTimeView;
	private TextView prefixContentView;
	private ImageView imageView;

	public InfoViewCache(View baseView) {
		this.baseView = baseView;
	}

	public TextView getTitleView() {
		if(null == titleView)
			titleView = (TextView) baseView.findViewById(R.id.infoTitleId);
		return titleView;
	}

	public TextView getCreateTimeView() {
		if(null == createTimeView)
			createTimeView = (TextView) baseView.findViewById(R.id.createTimeId);
		return createTimeView;
	}

	public TextView getPrefixContentView() {
		if(null == prefixContentView)
			prefixContentView = (TextView) baseView.findViewById(R.id.prefixContentId);
		return prefixContentView;
	}
	
	public ImageView getImageView() {
		if (null == imageView)
			imageView = (ImageView) baseView.findViewById(R.id.imageViewId);
		return imageView;
	}
	
}
